#ifndef _TREE_NODE_H_
#define _TREE_NODE_H_

#include "Object.h"

namespace MySTL
{

template < typename T >
class TreeNode : public Object
{
public:
	T value;
	TreeNode<T>* parent;
	
	TreeNode();
	bool need_to_delete();

	virtual ~TreeNode() = 0;

protected:
	TreeNode(const TreeNode& obj);
	TreeNode& operator =(const TreeNode& obj);

	void* operator new(size_t size) throw();

protected:
	bool m_need_to_delete;
};

template <typename T>
TreeNode<T>::TreeNode()
{
	m_need_to_delete = false;
}

template <typename T>
bool TreeNode<T>::need_to_delete()
{
	return m_need_to_delete;
}

template <typename T>
void* TreeNode<T>::operator new(size_t size) throw()
{
	return Object::operator new(size);
}

template <typename T>
TreeNode<T>::~TreeNode()
{

}

}

#endif